<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.min.css">  
<script src="/bootstrap/js/jquery-2.2.2.js"></script>  
<script src="/bootstrap/js/bootstrap.min.js"></script> 
<div id="main" class="container">
  <div class="row">
  <div class="col-lg-6 col-sm-6 col-md-6">
  <form action="${user==null ? 'submit' : '/user/update' }" method="post">
  <input type="hidden" name="user.id" value="${user.id }">
  <div class="form-group">
  <label>姓名</label>
  <input name="user.name" value="${user.name }" type="text" class="form-control" placeholder="请输入姓名">
  </div>
  <div class="form-group">
  <label>年龄</label>
  <input name="user.age" value="${user.age }" type="text" class="form-control" placeholder="请输入年龄">
  </div>
  <div class="form-group">
  <label>性别</label>
  <div class="radio-inline">
  <input name="user.sex" type="radio" <c:if test="${user!=null && user.sex==1 }"> checked="checked"</c:if> value="1">男
  </div>
  <div class="radio-inline">
  <input name="user.sex" type="radio" <c:if test="${user!=null && user.sex==2 }"> checked="checked"</c:if> value=2>女
  </div>
  
  </div>
  <div class="form-group">
  <label>备注</label>
  <textarea name="user.remark" style="height:70px;" class="form-control" placeholder="请输入备注">${user.remark }</textarea>
  </div>
  <div style="text-align:center">
  <button type="submit" class="btn btn-primary" style="width:120px;">提交</button>
  </div>
  </form>
  </div>
  </div>
</div>
</html>